<template>
  <div>
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
import dingMixin from  '@/mixins/ding'
import * as dd from 'dingtalk-jsapi'
export default {
  mixins: [dingMixin],
  mounted() {
    this.getDingConfig().then(config =>{
      this.dingConfig = config;
      this.dingLogin(config.corpId, () => {
        this.$router.replace({ name: 'sign-list', params: {id: this.$route.query.id}})
      });
      this.run_dd_config();
    })
  }
}
</script>
